ROOTFS_DIR = /nfs/rootfs

ifeq ($(KERNELRELEASE), )

KERNEL_DIR = /home/chh/mount/kernel/linux-4.14.78
#KERNEL_DIR = /lib/modules/4.15.0-48-generic/build

CUR_DIR = $(shell pwd)

DEBUG=y
ifeq ($(DEBUG),y)
        DEBFLAGS=-O2 -g -DPDEBUG
else
        DEBFLAGS=-O2
endif

CFLAGS+=$(DEBFLAGS)

all:
	make -C $(KERNEL_DIR) M=$(CUR_DIR) modules
clean:
	make -C $(KERNEL_DIR) M=$(CUR_DIR) clean
install:
	cp -raf *.ko $(ROOTFS_DIR)/drv_module
else
obj-m += debug_test.o
#obj-m += math.o


endif
